﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DTD2013.Common
{
    public class QueryString
    {
        public const string GET_WASTE_BY_WORKCODE = "select t.MaVatLieu, t.TenVatLieu, t.DonVi, d.KhoiLuong, p.GiaThuc, t.GiaThuc as GiaGoc\n" +
                                                    "from DinhMuc d inner join TuDienVatTu t on d.MaVatLieu = t.MaVatLieu\n" +
                                                                   "left join {0}Tdvt p on p.MaVatLieu = t.MaVatLieu\n" +
                                                    "where d.MaHieu = '{1}'";
        public const string GET_WASTE_BY_WASTECODE = "select t.MaVatLieu, t.TenVatLieu, t.DonVi, d.KhoiLuong, p.GiaThuc, t.GiaThuc as GiaGoc\n" +
                                                     "from DinhMuc d inner join TuDienVatTu t on d.MaVatLieu = t.MaVatLieu\n" +
                                                                    "left join {0}Tdvt p on p.MaVatLieu = t.MaVatLieu\n" +
                                                     "where d.MaVatLieu = '{1}'\n" +
                                                     "group by d.MaVatLieu";
        public const string GET_MORTAR = "select MaHieu, TenCongViec from CongTac where DinhMucVua = 1";

        public const string UPDATE_TDVT = "update TuDienVatTu set GiaThuc = {0} where MaVatLieu = '{1}';\n";
        public const string UPDATE_PROVINCE = "update {0}Tdvt set GiaThuc = {1} where MaVatLieu = '{2}';\n";

        public const string GET_ROW_NUMBER_TABLE = "select count(*) from {0}";
        public const string COPY_DATA = "insert into {0} select * from {1}";
        public const string DELETE_RECENT_FILE_PATH = "delete from [RecentFilePath] where [FilePath] = '{0}'";
        public const string ADD_RECENT_FILE_PATH = "insert into [RecentFilePath] ([FilePath], [CreateDate]) values ('{0}', '{1}')";
    }
}
